package com.example.secondhand.service;

import com.example.secondhand.model.shOrder;
import com.example.secondhand.vo.PageVo;

import java.util.List;

public interface OrderService {

    /**
     * 新增订单
     * @param orderModel
     * @return
     */
    boolean addOrder(shOrder orderModel);

    /**
     * 获取订单信息
     * @param id
     * @return
     */
    shOrder getOrder(Long id);

    /**
     * 更新订单信息
     * @param orderModel
     * @return
     */
    boolean updateOrder(shOrder orderModel);

    /**
     * 获取某个用户买到的闲置的订单列表
     * @param userId
     * @return
     */
    List<shOrder> getMyOrder(Long userId);

    /**
     * 获取某个用户卖出的闲置的订单信息
     * @param userId
     * @return
     */
    List<shOrder> getMySoldIdle(Long userId);

    PageVo<shOrder> getAllOrder(int page, int nums);

    boolean deleteOrder(long id);
}
